a=input()
num=int(a)
b=bin(num)[2:]
c=oct(num)[2:]
e=hex(num)[2:].upper()
print(b)
print(c)
print(a)
print(e)